package com.jsoft.manager;

import com.jsoft.model.RecipeDao;
import com.jsoft.model.core.ManagerImpl;

import java.util.List;

/**
 * Date: 05.09.13
 * Time: 11:29
 */

public class RecipeManagerImpl extends ManagerImpl<RecipeDao> implements RecipeManager {
    protected RecipeManagerImpl() {
        super(RecipeDao.class);
    }

    @Override
    public List<RecipeDao> getListByGroupId(Integer groupId) {
        return getEntityManager().createQuery("select d from RecipeDao d where d.group.id = " + groupId, RecipeDao.class).getResultList();
    }
}
